package algorithm;


/**
 * @description: 二维数组的初始化和遍历
 * @author: apple
 * @date:  2021/11/16 4:42 下午
 * @version 1.0
 **/
public class ArrayTest {

    public static void main(String[] args) {

        int[][] nums = {{2,3} , {1 , 2, 4} , {2,4,6} , {9,6,3,2,4,7,3,1}};

        for (int i = 0; i < nums.length; i++) {
            for (int j = 0; j < nums[i].length; j++) {

                System.out.print(nums[i][j]);
            }
            System.out.println();
        }

        System.out.println("----------");

        for (int i = nums.length - 1; i >= 0 ; i--) {
            for (int j = nums[i].length - 1; j >= 0 ; j--) {
                System.out.print(nums[i][j]);
            }
            System.out.println();
        }




    }
}
